package com.tjresearch.redisdbtasktracker.Mapper;

import java.util.Date;
import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import com.tjresearch.redisdbtasktracker.pojo.BuildMain;
import com.tjresearch.redisdbtasktracker.pojo.HfData;
import com.tjresearch.redisdbtasktracker.pojo.Rate;
@Mapper
public interface JobMapper {

	void InsertSourceData(HfData hfData);

	void InsertDailyData(HfData hfData);

	List<HfData> findAllDataFinal();

	void insertSRate(Rate rate);

	HfData findDataByItemAndDate(@Param("item_id") int item_id,@Param("hdate") Date date);
	//获取前30天的数据和
	Double calRValue(@Param("item_id") int item_id,@Param("enddate") Date date,@Param("startdate") Date startCalTime);
	List<Integer> findAllSourceItemId();
	
	Integer findRateIdByIdType(@Param("souItemId") Integer souItemId,@Param("dataTypeId") int i);
	
	String findFillConditionByItemid(@Param("item_id") Integer item_id);

	int translateToDailyId(@Param("item_id")Integer item_id);

	void batchInsertSourceData(List<HfData> aRawSeries);

	void batchInsertDailyData(List<HfData> aRawSeries);

	void batchInsertSRate(List<Rate> aRateList);

	void truncateHighfreqData();
	
	void deleteV7Function1DailyData();
	
	void insertV7Function1DailyData();
	
	void deleteV7Function2DailyData();
	
	void insertV7Function2DailyData();
	
	List<HfData> findDataByItemId(@Param("item_id") int item_id);

	void deleteBuildInDaily();

	void truncateMainFill();

	void batchInsertBuildFill(List<BuildMain> mainFillDataList);

	void truncateSourceData();

	void truncateDailyData();

	

}
